﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Cn.Edwon.Web.Support;
using System.IO;

namespace Cn.Cellula.Website.Admin.Content.Fos {
    public partial class Edit : PageSupport {
        protected void Page_Load(object sender, EventArgs e) {
            if (!Page.IsPostBack) {
                LoadContent();
            }
        }

        private void LoadContent() {
            String filePath = Request.QueryString["f"];
            this.lab_FilePath.Text = filePath;
            if (!File.Exists(filePath)) {
                this.txt_Content.Text = "打开文件失败：文件不存在";
                return;
            }
            try {
                this.txt_Content.Text = File.ReadAllText(filePath);
            } catch (Exception ex) {
                this.txt_Content.Text = "打开文件失败："+ex.Message;
                return;
            }
        }

        protected void btn_Save_Click(object sender, EventArgs e) {

        }
    }
}
